package com.netcracker.automonic.parser;

import java.io.IOException;

import org.apache.log4j.Logger;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public abstract class JsoupParser {
	
	private static final Logger log = Logger.getLogger(JsoupParser.class);
	protected Document doc;
	protected String url;

	protected abstract Document getNextPage();

	protected Document getDocumentByConnect() {
		try {
			doc = Jsoup.connect(url).get();
			return doc;
		} catch (IOException e) {
			log.trace("Error when connect", e);
			return null;
		}
	}
}
